package com.study.model.pojo;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;


/**
 * The persistent class for the demand database table.
 * 
 */
@Entity
@NamedQuery(name="Demand.findAll", query="SELECT d FROM Demand d")
public class Demand implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="dem_id")
	private int demId;

	@Column(name="dem_content")
	private String demContent;

	@Column(name="dem_name")
	private String demName;

	@Column(name="dem_provide")
	private String demProvide;

	@Temporal(TemporalType.DATE)
	@Column(name="dem_writetime")
	private Date demWritetime;

	//bi-directional many-to-one association to Affix
	@ManyToOne
	@JoinColumn(name="dem_annex")
	private Affix affix;

	//bi-directional many-to-one association to Customer
	@ManyToOne
	@JoinColumn(name="cus_id")
	private Customer customer;

	//bi-directional many-to-one association to Dictionary
	@ManyToOne
	@JoinColumn(name="dem_mportance")
	private Dictionary dictionary;

	//bi-directional many-to-one association to Opportunity
	@ManyToOne
	@JoinColumn(name="opp_id")
	private Opportunity opportunity;

	public Demand() {
	}

	public int getDemId() {
		return this.demId;
	}

	public void setDemId(int demId) {
		this.demId = demId;
	}

	public String getDemContent() {
		return this.demContent;
	}

	public void setDemContent(String demContent) {
		this.demContent = demContent;
	}

	public String getDemName() {
		return this.demName;
	}

	public void setDemName(String demName) {
		this.demName = demName;
	}

	public String getDemProvide() {
		return this.demProvide;
	}

	public void setDemProvide(String demProvide) {
		this.demProvide = demProvide;
	}

	public Date getDemWritetime() {
		return this.demWritetime;
	}

	public void setDemWritetime(Date demWritetime) {
		this.demWritetime = demWritetime;
	}

	public Affix getAffix() {
		return this.affix;
	}

	public void setAffix(Affix affix) {
		this.affix = affix;
	}

	public Customer getCustomer() {
		return this.customer;
	}

	public void setCustomer(Customer customer) {
		this.customer = customer;
	}

	public Dictionary getDictionary() {
		return this.dictionary;
	}

	public void setDictionary(Dictionary dictionary) {
		this.dictionary = dictionary;
	}

	public Opportunity getOpportunity() {
		return this.opportunity;
	}

	public void setOpportunity(Opportunity opportunity) {
		this.opportunity = opportunity;
	}

}